#include <boost/scoped_ptr.hpp>
#include <iostream>
int main()
{
    boost::scoped_ptr<int> i(new int);
    *i = 1;
    *i.get() = 2;
    i.reset(new int(3));
    std::cout << *i << std::endl;
    std::cout << std::boolalpha << (bool)i << std::endl;
}